package com.mdb.open.epay.domain.bo;

import com.mdb.bc.api.data.DataObjectBase;
import com.mdb.bc.validator.annotaion.validation.ApiEnumValue;
import com.mdb.bc.validator.annotaion.validation.Split;
import com.mdb.open.epay.enums.type.OrderQueryBizTypeEnum;
import com.mdb.open.epay.enums.type.OrderQuerySearchTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * @author liuyi
 * @date 2019/11/14
 **/
@Data
public class QueryOrderBo extends DataObjectBase {

    private static final long serialVersionUID = 1L;

    /**
     * 客户编码
     */
    @ApiModelProperty(value = "客户编码")
    @NotBlank(message = "客户编码不能为空")
    private String customerCode;
    /**
     * 查詢類型
     */
    @ApiModelProperty(value = "訂單查詢類型")
    @NotBlank(message = "訂單查詢類型不能为空")
    @Size(max = 16)
    @ApiEnumValue(target = OrderQuerySearchTypeEnum.class, message = "訂單查詢類型不存在或暫不支持")
    private String searchType;

    /**
     * 業務類型
     */
    @ApiModelProperty(value = "業務類型")
    @NotBlank(message = "業務類型不能为空")
    @Size(max = 16)
    @ApiEnumValue(target = OrderQueryBizTypeEnum.class, message = "業務類型不存在")
    private String bizType;

    @ApiModelProperty(value = "交易開始時間")
    private LocalDateTime beginDate;

    @ApiModelProperty(value = "交易結束時間")
    private LocalDateTime endDate;

    /**
     * 訂單號列表
     */
    @ApiModelProperty(value = "訂單號列表,逗号分隔")
    @NotBlank(message = "訂單號列表不能为空")
    @Size(max = 640)
    @Split(maxSize = 20)
    private String orderNoList;
}